package org.example.factory01;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author liyishan
 * @date 2024/2/18 14:13
 * @apiNote
 */
@Slf4j
@Component
public abstract class AbstractBaseJdStrategy {
    /**
     * 实例化时初始化 JD API 对象
     */
    private final JdApi jdApi = this.getJdApiBean();
    /**
     * 获取jdApi对象实例
     *
     * @return JdApi
     */
    abstract JdApi getJdApiBean();

    /**
     * 获取不同主体默认参数
     *
     * @return DefaultExpressParam
     */
    public abstract String getExpressParams();

    /**
     * 走不同主体公司的判断标识
     *
     * @return String
     */
    public abstract String getCompany();

    public String test(String test){
        return jdApi.test(test);
    }

}
